A Deterministic Operational Semantics for Functional Logic Programs
نویسندگان
چکیده
This paper introduces a deterministic operational semantics for functional logic programs including notions like laziness, sharing, concurrency, non-deterministic functions, etc. Our semantic description is important not only to provide appropriate language definitions to reason about programs and check the correctness of implementations but it is also a basis to develop language-specific tools, like program tracers, profilers, optimizers, etc. Starting from a “big-step” semantics in natural style which relates expressions and their evaluated results—but it is not sufficient to cover concurrency, search strategies, or to reason about costs associated to particular computations—, we define a “small-step” operational semantics which actually covers the advanced features of modern functional logic languages.
منابع مشابه
A Semantics for Propositions as Sessions
Session types provide a static guarantee that concurrent programs respect communication protocols. Recently, Caires, Pfenning, and Toninho, and Wadler, have developed a correspondence between propositions of linear logic and session typed π-calculus processes. We relate the cut-elimination semantics of this approach to an operational semantics for session-typed concurrency in a functional langu...
متن کاملNondeterminism Analysis of Functional Logic Programs
Information about the nondeterminism behavior of a functional logic program is important for various reasons. For instance, a nondeterministic choice in I/O operations results in a run-time error. Thus, it is desirable to ensure at compile time that a given program is not going to crash in this way. Furthermore, knowledge about nondeterminism can be exploited to optimize programs. In particular...
متن کاملAutomatic Verification of Programs with Indirection
In the first part we prove the correctness of an existing verification algorithm, namely counterexample-driven abstraction refinement. To be able to state the correctness of the algorithm, we modify it such that it verifies programs that have a formal semantics. We use propositional dynamic logic and we give a denotational semantics and an equivalent structural operational semantics. Then we co...
متن کاملRelating two semantic descriptions of functional logic programs
A distinctive feature of modern functional logic languages like Toy or Curry is the possibility of programming non-strict and non-deterministic functions with calltime choice semantics. For almost ten years the CRWL framework [6,7] has been the only formal setting covering all these semantic aspects. But recently [1] an alternative proposal has appeared, focusing more on operational aspects. In...
متن کاملOperational Semantics for Functional Logic Languages
In this work we provide a semantic description of functional logic languages covering notions like laziness, sharing, and non-determinism. Such a semantic description is essential, for instance, to have appropriate language definitions in order to reason about programs and check the correctness of implementations. First, we define a “big-step” semantics in natural style to relate expressions an...
متن کامل